using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using NetworkPower.DataAccess.Models.Mapping;

namespace NetworkPower.DataAccess.Models
{
    public partial class NetworkPowerContext : DbContext
    {
        static NetworkPowerContext()
        {
            Database.SetInitializer<NetworkPowerContext>(null);
        }

        public NetworkPowerContext()
            : base("Name=NetworkPowerContext")
        {
        }

        public DbSet<Equipment> Equipments { get; set; }
        public DbSet<Project> Projects { get; set; }
        public DbSet<Separation> Separations { get; set; }
        public DbSet<Voltage> Voltages { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new EquipmentMap());
            modelBuilder.Configurations.Add(new ProjectMap());
            modelBuilder.Configurations.Add(new SeparationMap());
            modelBuilder.Configurations.Add(new VoltageMap());
        }
    }
}
